package team.szm.scd.database.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import team.szm.scd.database.entity.Department;
import team.szm.scd.database.vo.DiseaseVO;

import java.util.List;

@Repository
public interface DepartmentMapper extends BaseMapper<Department> {
    @Select("SELECT dpname as name, dpenname as englishName," +
            "   dhh.dpid as id, dpinfo as info \n" +
            "FROM department natural join dp_h_have dhh\n" +
            " ${ew.customSqlSegment}")
    List<Department> departmentsFromQueryWrapper(@Param("ew")
                                                 Wrapper<Department> wrapper);
}
